var tmpl = __inline('cpplay.tmpl');
var tpl = require('common:components/tpl/tpl').compile(tmpl);
var layer = require('base:components/layer/layer.js').skin();

exports.cpplay = function(dom, data) {
	data.dotype = ($('.main-box.xz').length ? 'xz' : 've');
	$(document).off('click', dom, play).on('click', dom, data, play)
}


function play(ev) {
	layer.open({
		type: 1,
		title: false,
		area: '730px',
		content: tpl({
			data: ev.data
		}),
		success: function($layero) {
			// console.log($layero)
			if ($('.main-box.xz').length) {
				$layero.addClass('xz')
			}
		}
	});
}